<meta charset="UTF-8">
<div id="idle-report">
    <div class="demo-spin-container" v-if="isSpin">
        <Spin size="large" fix></Spin>
    </div>
    <div class="report-item-header">
        <Row style="margin:10px;height: 32px;">
            <div class="fl">
                <div>{{$t("reportForm.selectDev")}}:&nbsp;</div>
            </div>
            <div style="position: relative;width: 200px;" class="fl">
                <div class="search-wrapper" v-click-outside.capture="onClickOutside">
                    <i-input v-model.trim="sosoValue" icon="ios-close-circle-outline" @on-change="sosoValueChange" @on-focus="focus" :placeholder="placeholder" @on-click="onClickIcon"></i-input>
                    <transition name="fade">
                        <div class="search-item-wrapper" v-show="isShowMatchDev">
                            <ul id="ztree" class="ztree"></ul>
                        </div>
                    </transition>
                </div>
            </div>
            <div style="margin-left:10px;width: 72px;position: relative;" class="fl">
                <i-select v-model="intervalminutes">
                    <i-option value="0">0{{$t("reportForm.minute")}}</i-option>
                    <i-option value="5">5{{$t("reportForm.minute")}}</i-option>
                    <i-option value="10">10{{$t("reportForm.minute")}}</i-option>
                    <i-option value="30">30{{$t("reportForm.minute")}}</i-option>
                </i-select>
            </div>
            <div style="padding-left: 10px;" class="fl">
                <span>{{$t("reportForm.selectTime")}}:</span>
                <date-picker type="daterange" :value="dateVal" :editable="false" :clearable="false" @on-change="onChange" show-week-numbers style="width:180px" placement="bottom-start"></date-picker>
            </div>
            <div style="height: 35px; line-height: 35px;margin-left: 20px;" class="spans-wrap fl">
                <span class="cursor-pointer" @click="handleSelectdDate(0)" :style="{color: dayNumberType == 0 ? '#2D8CF0' : '#515A6E'}">{{$t("reportForm.toDay")}}</span> <b>｜</b>
                <span class="cursor-pointer" @click="handleSelectdDate(1)" :style="{color: dayNumberType == 1 ? '#2D8CF0' : '#515A6E'}">{{$t("reportForm.yesterDay")}}</span> <b>｜</b>
                <span class="cursor-pointer" @click="handleSelectdDate(3)" :style="{color: dayNumberType == 3 ? '#2D8CF0' : '#515A6E'}">{{$t("reportForm.threeDays")}}</span>
            </div>
            <div style="margin-left:10px;" class="fl">
                <i-button @click="onClickQuery">{{$t("reportForm.query")}}</i-button>
            </div>
        </Row>
        <div style="margin:10px;">
            <Tabs :value="activeTab" @on-click="onClickTab" :animated="true">
                <Tab-pane :label="$t('reportForm.idleStatistics')" name="tabTotal">
                    <i-table ref="totalTable" size="small" :columns="allColumns" :data="allTableData" :height="lastTableHeight" :loading="loading"></i-table>
                </Tab-pane>
                <Tab-pane :label="$t('reportForm.idleDetailed')" name="tabDetail">
                    <div style="width:100%;height: 180px;position: relative;margin-bottom: 10px;">
                        <div id="idle-charts" style="height: 180px;width: 100%;"></div>
                    </div>
                    <i-table ref="detailTable" size="small" :columns="columns" :height="lastTableHeight-180" :data="tableData" :loading="loading" @on-sort-change="onSortChange"></i-table>
                </Tab-pane>
                <i-button type="primary" size="small" slot="extra" style="margin:7px 5px 0 0;" @click="exportData">{{$t("reportForm.exportData")}}</i-button>
            </Tabs>
        </div>
    </div>
    <transition name="fade">
        <div v-show="trackDetailModal" class="posi-map-wraper">
            <div class="map-modal" @click="trackDetailModal=false"></div>
            <div class="work-inner-map-wraper">
                <div class="posi-map-title">
                    {{$t("monitor.track")}}
                    <div class="map-close"></div>
                </div>
                <div id="idle-details-map" class="work-details-map"></div>
            </div>
        </div>
    </transition>
</div>